luci-base: Use getMode in getActiveMode
authorEvan Benn <[email protected]>
Fri, 8 Dec 2023 02:18:41 +0000 (13:18 +1100)
committerEvan Benn <[email protected]>
Thu, 14 Dec 2023 22:11:13 +0000 (09:11 +1100)
Signed-off-by: Evan Benn <[email protected]>
modules/luci-base/htdocs/luci-static/resources/network.js

index 887c3d57f0f2ef3774f9951a15c5254be1331533..5c48d3c90010ecd632c9cc03eb122513e63ef99a 100644 (file)
@@ -3837,7 +3837,7 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */
         *  - `Unknown`
         */
        getActiveMode: function() {
-               var mode = this.ubus('net', 'iwinfo', 'mode') || this.ubus('net', 'config', 'mode') || this.get('mode') || 'ap';
+               var mode = this.ubus('net', 'iwinfo', 'mode') || this.getMode();
 
                switch (mode) {
                case 'ap':      return 'Master';